home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11185 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: news.wwa.com!news
  2. From: pdubois@wwa.com (PDuBois)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Borland C++ 4.52 OWL child dialog question
  5. Date: Wed, 13 Mar 1996 03:07:24 GMT
  6. Organization: SaturnSoft
  7. Message-ID: <4i5e14$nj0@kirin.wwa.com>
  8. References: <1223.6645T140T1158@cis.ufl.edu>
  9. NNTP-Posting-Host: pool2-027.wwa.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. ep@cis.ufl.edu (Ed Porras) wrote:
  13.  
  14. >Hi,
  15.  
  16. >I'm running Win95 and coding with Borland C++ 4.52.. our project is
  17. >using OWL with resources..
  18.  
  19. >the problem is when we have a dialog with a child dialog, is there something
  20. >that I must take care of to handle the correct destruction of them?
  21. >is, for some reason, the HWindow shared between the two? the reason
  22. >i'm asking is because if the user pops up the first (parent), and then
  23. >activates a callback to popup it's child dialog an exeption will occur
  24. >upon exiting the application if IDCANCEL was returned by both dialogs..
  25.  
  26. >my destructors are both calling Destroy() and then deleting private members
  27. >that i've allocated..
  28.  
  29. >i've traced through the exiting, and the execption is occurs nowhere in
  30. >my code.. it happens after  - as if it's deallocating something that is not
  31. >there..
  32.  
  33. >does anyone know about this? please mail me at
  34.  
  35. >ep@cis.ufl.edu
  36.  
  37.  
  38. >thanks
  39.  
  40. >-e
  41.  
  42. >--
  43. >---------------------------------------------------------------
  44. >  Ed Porras                 | Email: ep@cis.ufl.edu
  45. >  2777 SW Archer Rd. AJ-308 | WWW: http://www.cis.ufl.edu/~ep/
  46. >  Gainesville, Fl 32608     | University of Florida, CISE Dept.
  47. >  (352) 335-8169            | Work: (352) 373-2626
  48. >---------------------------------------------------------------
  49.  
  50. Ed, 
  51.  
  52.    Your not deleting the child dialogs, are you?  You don't have to
  53. and SHOULD NOT delete anything that you assign to a parent.  If you
  54. create a dialog, passing a pointer to it's parent, then you dont have
  55. explicitly delete the child.  When you delete the parent, it will take
  56. care of it for you.
  57.  
  58.    Owl is confusing in this way.  It also holds that if you create a
  59. window, and pass a pointer to a child window to the constructor, the
  60. same holds true.
  61.  
  62. Hope this helps,
  63.  
  64. Paul
  65.  
  66.  
  67.  
  68.